<template>
  <div class="home">
    <div class="head">
      <div class="head-l">
        <h1><span>欢迎使用</span>张ks毕设题目</h1>
      </div>
      <div class="head-r">
        <span class="loginout" @click="outLogin">Logout</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeView",
  methods: {
    outLogin() {
      this.$store.commit("deleteToken");
      this.$store.commit("deleteUser");
      this.$message({
        message: "退出登录",
        type: "success",
      });
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="scss" scoped>
.head {
  position: fixed;
  width: 100%;
  padding: 0 30px;
  height: 66px;
  background-color: rgb(47, 48, 53);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #34373d;
  z-index: 100;
  .head-l {
    color: #8a8d93;
    font-size: 20px;
    letter-spacing: 3px;
    h1 span {
      color: #db5674;
    }
  }
  .head-r {
    span {
      margin-right: 60px;
      font-size: 16px;
      color: #8a8d93;
    }
  }
  .loginout {
    cursor: pointer;
  }
}
</style>